package com.ruoyi.flowable.services;

import org.flowable.engine.repository.ProcessDefinition;

import java.util.Date;

/**
 * @author  jhw
 */

public interface ProcessDefinitonService {

    /**
     * 查询流程定义
     * @param processDefinitionId
     * @return
     */
    ProcessDefinition queryProcessDefinition(String processDefinitionId,String key,String name);

    /**
     * 挂起流程定义
     * @param definitionId
     * @param isSuspendProcessInstances
     * @param suspendedDate
     */
    void suspend(String definitionId, boolean isSuspendProcessInstances, Date suspendedDate);

    /**
     * 激活流程定义
     * @param definitionId
     * @param isSuspendProcessInstances
     * @param suspendedDate
     */
    void activate(String definitionId, boolean isSuspendProcessInstances, Date suspendedDate);

    /**
     * 删除流程定义
     * @param definitionId
     */
    void delete(String definitionId ,boolean cascade);
}
